package com.ssd.controller;

import com.ssd.entity.TaskDetails;
import com.ssd.service.TaskDetailsService;
import com.ssd.view.BaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * TaskDetailsCpntroller 类
 *
 * @title:
 * @requirement:
 * @ClassName:
 * @author:首雯静
 * @creationTime:2024/12/20/16:58
 * @version: 1.0
 */
@RestController
@RequestMapping("/manage/taskDetails")
public class TaskDetailsController {

    @Autowired
    private TaskDetailsService taskDetailsService;

    /**
     * 获取工单详细信息
     * @param taskId
     * @return
     */
    @GetMapping("/byTaskId/{taskId}")
    public BaseResponse<List<TaskDetails>> getListByTaskId(@PathVariable Long taskId){
        List<TaskDetails> taskDetailsList = taskDetailsService.getListByTaskId(taskId);
        return new BaseResponse<>(taskDetailsList);
    }
}
